<?php

use yii\db\Migration;

/**
 * Handles the creation of table `upload_file`.
 */
class m170323_035456_create_upload_file_table extends Migration
{
    /**
     * @inheritdoc
     */
    public function up()
    {
        $this->createTable('upload_file', [
            'id' => $this->primaryKey()->comment('主键自增ID'),
            'filename'=>$this->string(1024)->notNull()->comment('文件名'),
        ],'ENGINE=INNODB');
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('upload_file');
    }
}
